package cn.edu.cdu.group4nb.controller;

import cn.edu.cdu.group4nb.service.EmployerService;
import cn.edu.cdu.group4nb.service.UserInfoService;
import cn.edu.cdu.group4nb.utils.R;
import cn.edu.cdu.group4nb.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
public class EmployerController {
    @Autowired
    private EmployerService employerService;

    @ResponseBody
    @GetMapping("/employerManager/selectNormalEmp")
    public List<Map<String, Object>> selectNormalEmp() {
        return employerService.selectNormalEmp();
    }
    @ResponseBody
    @GetMapping("/employerManager/getGenderCount")
    public R getGenderCount() {
        return R.ok().put("countGender", employerService.getCountGender());

    }
    @ResponseBody
    @GetMapping("/employerManager/getSalaryCount")
    public R getSalaryCount() {
        return R.ok().put("countSalary", employerService.getSalaryCount());
    }
    @ResponseBody
    @GetMapping("/employerManager/getEducationCount")
    public R getEducationCount() {
        return R.ok().put("countEducation", employerService.getEducationCount());
    }

}
